<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<html>
     <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <style type='text/css'>
            <!--
            body {
                background-color: #454343;
                margin-left: 17px;
                margin-top: 0px;
                margin-right: 0px;
                margin-bottom: 0px;
            }
            -->
        </style>
    </head>
    <body>
        <?php
            $custContactLogID = $_GET['custContID'];
            include "Datasource.php";
            include "CustContactLog.php";
            include "CustContactLogDao.php";
            include "Employee.php";
            include "EmployeeDao.php";
            $conn = new Datasource("localhost","theanykey","root","");
            $ccDao = new CustContactLogDao();
            $custContact = $ccDao->getObject($conn, $custContactLogID);
        ?>
        <center>
            <h2>Delete Customer Contact Log Entry</h2>
            <br/>
            <form id="frmDeleteCustContact" action="CustContactPopupDeleteFunc.php" method="post">
            <table>
                <tr>
                    <td>
                       Employee
                    </td>
                    <td>
                        <?php
                        $empDAO = new EmployeeDao();
                        $empAssigned = $empDAO->getObject($conn, $custContact->getEmpID());
                        echo $empAssigned->getLastName() . ", " . $empAssigned->getFirstName()?>
                    </td>
                </tr>
                <tr>
                    <td>
                       Date
                    </td>
                    <td>
                        <?php echo $custContact->getDateContacted();?>
                    </td>
                </tr>
                <tr>
                    <td>
                       Notes
                    </td>
                    <td>
                        <?php echo $custContact->getContactNotes();?>
                    </td>
                </tr>
            </table>
            <input type="hidden" value="<?php echo $_SESSION['userID'];?>" name="empID" />
            <br/>
            <br/>
                <input type="hidden" name="ccPK" value="<?php echo $custContact->getCntctLogID(); ?>" />
                <input type="button" value="Submit" onclick="submitDeleteForm();" />
                &nbsp;
                <input type="Button" value="Cancel" onclick="window.close();" />
            </form>
        </center>
        </body>
        <script type="text/javascript">
            function submitDeleteForm()
            {
                if(confirm("Are you sure you wish to delete this record?"))
                {
                    document.getElementById("frmDeleteCustContact").submit();
                }
            }
        </script>
</html>
